﻿/*
 *	Copyright (c) 2009 Queensland University of Technology. All rights reserved.
 *	The QUT Bioinformatics Collection is open source software released under the 
 *	Microsoft Public License (Ms-PL): http://www.microsoft.com/opensource/licenses.mspx.
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QUT.Bio.Util;

namespace BlastExplorer {
	public class Taxon: IComparable {
		public string ScientificName;
		public string GenbankCommonName;
		public decimal TaxId;
		public decimal ParentId;
		public readonly List<Taxon> Children = new List<Taxon>();

		public override string ToString () {
			return String.Format( "{0} ({1})", ScientificName, TaxId );
		}

		public int CompareTo ( object obj ) {
			return string.Compare( ScientificName, ((Taxon) obj).ScientificName, true );
		}
	}
}
